<h2>Danh sách đơn hàng</h2>
<table class="tb_table" width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr class="tb_head">
	<td>Thứ tự</td>
	<td>Mã hoá đơn</td>
    <td>Tour</td>
    <td>Khách Sạn</td>
    <td>Phương tiện</td>
	<td>Danh sách khách</td>
  </tr>
	<?php 
		$cnt = 0;
		foreach ($orders as $order) 
		{
			$cnt ++;
	?>
  		<tr class="tb_content">
			<td><?php echo $cnt ?></td>
			<td><?php echo $order->getinvoice_id() ?></td>
			<td><?php if ($order->gettour_id()) {	
				$tour = new Tour();$tour->select($order->gettour_id()); 
				echo '<a href="?act=edit_tour&tour_id='.$tour->getid().'">'.$tour->getname().'</a>';
			} 
			?>
			</td>
			<td><?php 
				if ($order->gethotel_id()) {
					$hotel = new Hotel();
					$hotel->select($order->gethotel_id());
					echo '<a href="?act=edit_hotel&hotel_id='.$hotel->getid().'">'.$hotel->getname().'</a>';
				}
				?>
				</td>
			<td><?php echo $order->gettransfer_id() ?></td>
			<td><a href="?act=customers_list&order_id=<?php echo $order->getid() ?>"><img src="images/edit.gif"></a></td>
  		</tr>
	<?php } ?>
</table>